@extends('admin.layouts.app')  

@section('content')
    <div  class="content-wrapper" style="min-height: 850px;">
        <section class="content-header">
            <h3><i class="fa fa-star-half-full" aria-hidden="true"></i>菜单管理</h3>
            <ol class="breadcrumb">
                <li>
                    <a href="{{ url('/') }}"><i class="fa fa-home"></i> Home</a>
                </li>
                <li>
                    <a href="{{ url('role') }}">菜单管理</a>
                </li>
                <li>
                    <a href="">菜单添加</a>
                </li>
            </ol>
        </section>

        <section class="content">
            <div class="col-xs-9">
                <div class="card-box box-warning">
                    <div class="box-header with-border">
                        <h3 class="box-title"></h3>
                    </div>
                    <form  role="form" action="{{ url('zadmin/menu') }}" method="POST">
                        <!-- /.box-header -->
                        <div class="box-body">
                            {{ csrf_field() }}
                            <!-- text input -->
                            <div class="form-group">
                                <label>菜单名称</label>
                                <input type="text" class="form-control" placeholder="菜单名" name="name">
                            </div>
                            <div class="form-group">
                                <label>URL</label>
                                <input type="text" class="form-control" placeholder="URL" name="url">
                            </div>
                            <div class="form-group">
                                <label>排序</label>
                                <input type="text" class="form-control" placeholder="排序数字" value="{{$weight}}" name="weight">
                            </div>
                            <div class="form-group">
                                <label>icon小图标</label>
                                <input type="text" class="form-control" placeholder="小图标" name="icon">
                            </div>
                            {{--<div class="form-group">
                                <label>上级菜单</label><br/>
                                <select class="form-control" name="parent_id">
                                <option value="0">顶级菜单</option>
                                @foreach($menus as $menu)
                                    <option value="{{$menu->id}}">{{$menu->name}}</option>   
                                @endforeach
                                </select>
                            </div>--}}
                        </div>
                        <div class="box-footer">
                            <button type="submit" class="btn btn-primary">提交</button>
                            <button type="reset" class="btn btn-default pull-right">重置</button>
                        </div>
                        {{csrf_field()}}
                       
                    </form>
                    <!-- /.box-body -->
                </div>
            </div>
        </section>
    </div>
@endsection
@section('js')
    <script>
        @if (count($errors) > 0)
             swal({
                title: "提示",
                text: "{{ $errors->first() }}",
                type: "warning",
                confirmButtonColor: "#F7D358",
                confirmButtonText: "确认",
            });
        @endif
    </script>
@endsection